package com.eastfair.config.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 附件资源管理
 * </p>
 *
 * @author zjn
 * @since 2021-08-31
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AttachmentDTO implements Serializable {

    /**
     * 校验标识 新增校验
     */
    public interface VerifyInsert {
    }

    /**
     * 校验标识 修改校验
     */
    public interface VerifyUpdate {
    }

    /**
     * 校验标识 查询校验
     */
    public interface VerifyQuery {
    }

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    private Long projectId;

    /**
     * 文件名称
     */
    @ApiModelProperty(value = "文件名称")
    private String fileName;

    /**
     * 附件地址
     */
    @ApiModelProperty(value = "附件地址")
    @NotBlank(groups = {VerifyInsert.class})
    private String fileUrl;

    /**
     * 附件类型
     */
    @ApiModelProperty(value = "附件类型")
    private String fileType;

    /**
     * 业务类型
     */
    @ApiModelProperty(value = "业务类型")
    @NotBlank(groups = {VerifyUpdate.class, VerifyInsert.class, VerifyQuery.class})
    private String businessType;

    /**
     * 业务id
     */
    @ApiModelProperty(value = "业务id")
    @NotNull(groups = {VerifyUpdate.class, VerifyInsert.class, VerifyQuery.class})
    private Long businessId;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sequence;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    private Integer isEnable;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    private Integer isDelete;

}
